﻿using System;
using System.Media;

namespace WPFMetronom
{
	class MySoundPlayer
	{

		#region Declarations

		private SoundPlayer mspPlayer;

		#endregion

		#region Constructors

		public MySoundPlayer ( string sSoundLoc = @"metronome.wav" )
		{
			try
			{
				mspPlayer = new SoundPlayer ( sSoundLoc );
			}
			catch ( Exception ex )
			{
				Logger.Log ( ex );
			}
		}

		#endregion

		#region Public Methods

		public void PlayOnce ( )
		{
			mspPlayer.PlaySync ( );
		}

		#endregion
	}
}
